package com.nowcode.community.service;

import com.nowcode.community.entity.Message;

import java.util.List;

/**
 * ClassName: MessageService
 * Package: com.nowcode.community.service
 * Description:
 *
 * @Author: 信
 * @Create: 2024/1/24 - 18:14
 */
public interface MessageService {
    int findConversationCount(int id);

    List<Message> findConversations(int userId, int offset, int limit);

    List<Message> findLetters(String conversationId, int offset, int limit);

    int findLetterCount(String conversationId);

    int findLetterUnreadCount(int userId, String conversationId);

    int addMessage(Message message);

    int readMessage(List<Integer> ids);

    Message findLatestNotice(int userId, String topic);

    int findNoticeCount(int userId, String topic);

    int findNoticeUnreadCount(int userId, String topic);

    List<Message> findNotices(int userId, String topic, int offset, int limit);



}
